﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Configuration;
using System.Web.Configuration;

namespace iHouse.Common.Configuration
{
    public class IHouseSection:ConfigurationSection
    {
        public static readonly IHouseSection Current = (IHouseSection)WebConfigurationManager.GetSection("iHouse");

        [ConfigurationProperty("book")]
        public BookElement Book
        {
            get
            {
                return (BookElement)base["book"];
            }
        }

        [ConfigurationProperty("album")]
        public AlbumElement Album
        {
            get
            {
                return (AlbumElement)base["album"];
            }
        }

        [ConfigurationProperty("upload")]
        public UploadElement Upload
        {
            get
            {
                return (UploadElement)base["upload"];
            }
        }

        [ConfigurationProperty("pageGroupSize",DefaultValue=5,IsRequired=true)]
        public int PageGroupSize
        {
            get
            {
                return (int)this["pageGroupSize"];
            }
        }
    }
}
